import Vue from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import "ant-design-vue/dist/antd.css";
import "./assets/images/svg/index.js";
import "./style/reset.css";
import "./style/element/theme/index.css";
import "./style/common.scss";
import "./style/element-variables.scss";
import "./assets/images/svg/index.js";
import Empty from "@/components/Empty";
import { Icon as AIcon, Steps as ASteps } from "ant-design-vue";
import service from "@/api/service";
import "./echarts.js";
import { hasPermission } from "@/utils/directive.js";

// 挂载全局
Vue.prototype.$http = service; // ajax请求方法
import * as moment from "moment";
Vue.prototype.$moment = moment;

import VideoPlayer from "vue-video-player";
require("video.js/dist/video-js.css");
require("vue-video-player/src/custom-theme.css");
Vue.use(VideoPlayer);
const hls = require("videojs-contrib-hls");
Vue.use(hls);
Vue.use(hasPermission);
import {
  Alert,
  PageHeader,
  Collapse,
  CollapseItem,
  Image,
  Avatar,
  Header,
  Tooltip,
  Divider,
  Dropdown,
  DropdownItem,
  DropdownMenu,
  Breadcrumb,
  BreadcrumbItem,
  Menu,
  MenuItem,
  MenuItemGroup,
  Submenu,
  Col,
  Row,
  Select,
  Option,
  Button,
  Dialog,
  DatePicker,
  Input,
  InputNumber,
  Form,
  FormItem,
  Message,
  Upload,
  Tag,
  Tabs,
  TabPane,
  Table,
  TableColumn,
  Popover,
  Checkbox,
  CheckboxGroup,
  Radio,
  RadioButton,
  RadioGroup,
  Pagination,
  Cascader,
  MessageBox,
  Autocomplete,
  Loading,
  InfiniteScroll,
  Card,
  Scrollbar,
  Progress,
  Drawer,
  Tree,
  Rate,
  Popconfirm,
  Carousel,
  CarouselItem,
  Switch,
  Badge,
  Calendar,
} from "element-ui";
import ElanSearchForm from "elan-search-form";

Vue.config.productionTip = false;

Vue.component("Empty", Empty);
Vue.use(Card);
Vue.use(Rate);
Vue.use(Tree);
Vue.use(Alert);
Vue.use(Card);
Vue.use(Progress);
Vue.use(Drawer);
Vue.use(PageHeader);
Vue.use(Collapse);
Vue.use(CollapseItem);
Vue.use(Image);
Vue.use(Avatar);
Vue.use(Header);
Vue.use(Tooltip);
Vue.use(Divider);
Vue.use(Dropdown);
Vue.use(DropdownItem);
Vue.use(DropdownMenu);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Menu);
Vue.use(MenuItem);
Vue.use(MenuItemGroup);
Vue.use(Submenu);
Vue.use(Pagination);
Vue.use(Dialog);
Vue.use(Autocomplete);
Vue.use(Input);
Vue.use(InputNumber);
Vue.use(Radio);
Vue.use(RadioButton);
Vue.use(RadioGroup);
Vue.use(Checkbox);
Vue.use(CheckboxGroup);
Vue.use(Select);
Vue.use(Option);
Vue.use(Button);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(DatePicker);
Vue.use(Popover);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Tabs);
Vue.use(TabPane);
Vue.use(Tag);
Vue.use(Row);
Vue.use(Col);
Vue.use(Upload);
Vue.use(Cascader);
Vue.use(Scrollbar);
Vue.use(InfiniteScroll);
Vue.use(Loading.directive);
Vue.use(AIcon).use(ASteps);
Vue.use(ElanSearchForm);
Vue.use(Popconfirm);
Vue.use(Carousel);
Vue.use(CarouselItem);
Vue.use(Switch);
Vue.use(Badge);
Vue.use(Calendar);
Vue.prototype.$loading = Loading.service;
Vue.prototype.$alert = MessageBox.alert;
Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$message = Message;

Vue.prototype.$bus = new Vue();

Vue.prototype.$menuList = [
  {
    name: "数据总览",
    icon: "dataOverviewActive",
    route: "/userProcessDataManage",
  },
  {
    name: "详细数据",
    icon: "dataDetail",
    route: "/dataDetail",
  },
];

new Vue({
  router,
  store,
  render: (h) => h(App),
}).$mount("#app");
